package com.waner.helloworldproject.controllers;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@RestController
@RequestMapping("/")
public class HelloController {
    @RequestMapping("/hello")
    public void hello(HttpServletResponse response) throws IOException {
        System.out.println("ok..");
        response.getWriter().write("hello,world!");
    }
}
